package com.etcfg.etlaunch.ui;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.ImageIcon;

public class AboutAction extends AbstractAction {

	private MainWindow mainWindow;

	public AboutAction(MainWindow mainWindow) {
		this.mainWindow = mainWindow;
		putValue(NAME, "About");
		ImageIcon icon = new ImageIcon(getClass().getResource(
				"/com/etcfg/etlaunch/ui/icons/help-browser-32.png"));
		putValue(LARGE_ICON_KEY, icon);

	}

	@Override
	public void actionPerformed(ActionEvent e) {
		AboutDialog aboutDialog = new AboutDialog();
		aboutDialog.setLocationRelativeTo(mainWindow.getFrame());
		aboutDialog.setVisible(true);

	}

}
